# Contributor: Will Sinatra <wpsinatra@gmail.com>
# Contributor: Benjamin Buccianti <bebuccianti@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=nyxt
pkgver=2.2.4
pkgrel=0
pkgdesc="Atlas Engineer Nyxt Browser"
url="https://nyxt.atlas.engineer"
arch="x86_64 aarch64"
#SBCL must be compiled with thread support for Nyxt to work
#SBCL thread is not supported on armv7
#SBCL is only built on arches x86_64, aarch64, and armv7
license="BSD-3-Clause"
source="$pkgname-$pkgver.tar.xz::https://github.com/atlas-engineer/nyxt/releases/download/$pkgver/nyxt-$pkgver-source-with-submodules.tar.xz
	001-libfixposix.patch
	002-webkit2gtk.patch
	"
depends="
	gobject-introspection
	libffi
	libssl1.1
	so:libfixposix.so.3
	so:libwebkit2gtk-4.0.so.37
	"
makedepends="libffi-dev libfixposix-dev sbcl webkit2gtk-dev"
options="!check !strip" #No testsuite exists; Stripping the package causes the
# package to build, but the nyxt browser is unfunctional, dropping to an SBCL repl
# instead of properly running.

replaces=next
provides=next=$pkgver-r$pkgrel
builddir="$srcdir"

build() {
	make all
}

package() {
	make PREFIX=/usr DESTDIR="$pkgdir" install
}

sha512sums="
6334fbdd84ddd8c4e0b3d133f4ba65671bb58978b4104911a370bd4b4fab6bf1d7bc42834a4533799d6b3f6428ff0ad6d48b3f9d4419bdfdace9d5300b8fc464  nyxt-2.2.4.tar.xz
50ee0f0e2ee283f19efeefbd10b5e21dd26b0b40bf66e386bc8ad3e50e14e60615e936fb242b4144c2006542d9b9ddca7b545fb69ef367cd468921f4c2f5da35  001-libfixposix.patch
e3a5f11ebde41988502c18077c9c37d0f69c76a7b8b0c3ec123ac778c0e311974f5199f9b8c3c8e1f15fcac34d9560e1e388424053b4cc68e1bbff3560084ec5  002-webkit2gtk.patch
"
